package main

import "fmt"

// Student 声明自定义学生类型
type Student struct {
	name    string
	age     int
	courses []string
}

// NewStudent 模拟构造方法
func NewStudent(name string, age int, courses []string) *Student {
	return &Student{
		name:    name,
		age:     age,
		courses: courses,
	}
}

func main() {
	// 模拟构造方法
	var s = NewStudent("zhangsan", 21, []string{"math", "chinese"})
	fmt.Println(*s)
}
